package com.dandelion.business.entity.vo.role.req;


import com.dandelion.business.entity.vo.validationgroup.BaseInsert;
import com.dandelion.business.entity.vo.validationgroup.BaseUpdate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;



@Data
@ApiModel(value = "添加角色请求实体")
public class RoleReqVO {

    @Null(message = "id必须为空", groups = {BaseInsert.class})
    @NotNull(message = "id不能为空", groups = {BaseUpdate.class})
    @ApiModelProperty(value = "角色id,新增是为空,修改时必填")
    private Long id;

    @NotBlank(message = "角色名称不能为空", groups = {BaseInsert.class})
    @ApiModelProperty(value = "角色名称,新增是必传", required = true)
    private String name;

    @NotBlank(message = "角色权限不能为空", groups = {BaseInsert.class})
    @ApiModelProperty(value = "角色权限", required = true)
    private String roleKey;

    @NotNull(message = "角色状态不能为空", groups = {BaseInsert.class})
    @ApiModelProperty(value = "角色状态,1:正常,0:停用", required = true)
    private Integer state;

    @Length(min = 1, max = 100, message = "备注长度1-100")
    @ApiModelProperty(value = "备注")
    private String remark;

}
